import React, { FC } from "react";
import { Badge, TabBar } from "antd-mobile";
import * as Type from "@/utils/index";
import { AppOutline } from "antd-mobile-icons";
import { NavLink } from "react-router-dom";

type Props = { routes: Type.RouterList };

const My_footer: FC<Props> = ({ routes }) => {
  return (
    <TabBar>
      {routes.map((item: Type.RouterItem, index: number) => (
        <TabBar.Item
          key={index}
          icon={<AppOutline />}
          title={<NavLink to={item.path}>{item.title}</NavLink>}
        />
      ))}
    </TabBar>
  );
};

export default My_footer;
